package com.test.ml.yqs.service;

import com.test.ml.yqs.entity.UserTask;
import com.test.ml.yqs.mapper.UserTaskMapper;
import com.test.ml.yqs.utills.ResultJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 马亮
 * @version V1.0
 * @Description: TODO
 */
@Service
public class UserTaskService {
    @Autowired
    private UserTaskMapper mapper;

    /**
     * 新增任务，新增时要验证任务是否存在，通过classNamel来判断
     * @param userTask
     * @return
     * //TODO 重复任务判断
     */
    public ResultJson AddTask(UserTask userTask){
        mapper.insert(userTask);
        return ResultJson.buildSuccess("新增成功");
    }
}